package cn.lanqiao.facelogin.BaiDuFace;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;

import java.util.ArrayList;
import java.util.HashMap;

public class FrontendJSONReturnValue {
    public static String m1(Object json) {
        Object o = "[{score=99.002548217773, group_id=18512803590, user_id=yhz, user_info=cba}]";



//        JSONObject jsonObject = JSONObject.parseObject((String) s);
//        System.out.println(jsonObject);

        return "";
    }

    public static String m2(Object o2) {
        Object o = "[{score=99.002548217773, group_id=18512803590, user_id=yhz, user_info=cba}]";
        String[] s = (String[]) o;
        String json = "[";
        for (int i = 0; i < s.length; i++) {
            json += "{name:" + "'" + s[i] + "'";

            json += "}";
            if (i != s.length - 1) {
                json += ",";

            }
        }
        json += "]";

        return json;
    }


    public static void main(String[] args) {
        String s = m2("");
        System.out.println(s);
    }
}
